import type {ApiOptionalParamTy, ApiRequiredParamTy, ApiRespTy} from "./types";

export enum Py {
    PARTIAL_QUERY = 0,
    PARTIAL_JSON = 1,
    PARTIAL_FORM = 2,
    REQUIRED_QUERY = 'REQUIRED_QUERY',
    REQUIRED_JSON = 'REQUIRED_JSON',
    REQUIRED_FORM = 'REQUIRED_FORM',
}

export class ParamTy {
    public static Query<T = any>() {
        return Py.REQUIRED_QUERY as ApiRequiredParamTy<T>
    }
    public static Json<T = any>() {
        return Py.REQUIRED_JSON as ApiRequiredParamTy<T>
    }
    public static Form<T = any>() {
        return Py.REQUIRED_FORM as ApiRequiredParamTy<T>
    }
    public static PartialQuery<T = any>() {
        return Py.PARTIAL_QUERY as ApiOptionalParamTy<T>
    }
    public static PartialJson<T = any>() {
        return Py.PARTIAL_FORM as ApiOptionalParamTy<T>
    }
    public static PartialForm<T = any>() {
        return Py.PARTIAL_JSON as ApiOptionalParamTy<T>
    }
}
export class RespTy {
    public static Json<T>() {
        return undefined as unknown as ApiRespTy<T>
    }
}

export enum HttpMethod {
    GET = 'GET',
    POST = 'POST',
    PUT = 'PUT',
    HEAD = 'HEAD',
    DELETE = 'DELETE',
}
